package com.firebird.oms.domain.sm;

// Generated 2009-11-20 18:24:23 by Hibernate Tools 3.2.5.Beta

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * TismMenu generated by hbm2java
 */
@Entity
@Table(name = "tism_menu")
public class TismMenu implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer menuCode;
	private String menuName;
	private String menuDesc;
	private String menuUrl;
	private Integer menuFlag;
	private Integer menuIdend;
	private Integer menuUpCode;
	private Date createTime;
	private Date updateTime;
	private Integer sortId;

	public TismMenu() {
	}

	public TismMenu(String menuName, String menuDesc, String menuUrl,
			Integer menuFlag, Integer menuIdend, Integer menuUpCode,
			Date createTime, Date updateTime, Integer sortId) {
		this.menuName = menuName;
		this.menuDesc = menuDesc;
		this.menuUrl = menuUrl;
		this.menuFlag = menuFlag;
		this.menuIdend = menuIdend;
		this.menuUpCode = menuUpCode;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.sortId = sortId;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "menu_code", unique = true, nullable = false)
	public Integer getMenuCode() {
		return this.menuCode;
	}

	public void setMenuCode(Integer menuCode) {
		this.menuCode = menuCode;
	}

	@Column(name = "menu_name", length = 164)
	public String getMenuName() {
		return this.menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	@Column(name = "menu_desc", length = 254)
	public String getMenuDesc() {
		return this.menuDesc;
	}

	public void setMenuDesc(String menuDesc) {
		this.menuDesc = menuDesc;
	}

	@Column(name = "menu_url", length = 254)
	public String getMenuUrl() {
		return this.menuUrl;
	}

	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl;
	}

	@Column(name = "menu_flag")
	public Integer getMenuFlag() {
		return this.menuFlag;
	}

	public void setMenuFlag(Integer menuFlag) {
		this.menuFlag = menuFlag;
	}

	@Column(name = "menu_idend")
	public Integer getMenuIdend() {
		return this.menuIdend;
	}

	public void setMenuIdend(Integer menuIdend) {
		this.menuIdend = menuIdend;
	}

	@Column(name = "menu_up_code")
	public Integer getMenuUpCode() {
		return this.menuUpCode;
	}

	public void setMenuUpCode(Integer menuUpCode) {
		this.menuUpCode = menuUpCode;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "sort_id")
	public Integer getSortId() {
		return this.sortId;
	}

	public void setSortId(Integer sortId) {
		this.sortId = sortId;
	}

	public boolean equals(final Object other) {
		if (!(other instanceof TismMenu))
			return false;
		TismMenu castOther = (TismMenu) other;
		return new EqualsBuilder().append(menuCode, castOther.menuCode).append(
				menuName, castOther.menuName).append(menuDesc,
				castOther.menuDesc).append(menuUrl, castOther.menuUrl).append(
				menuFlag, castOther.menuFlag).append(menuIdend,
				castOther.menuIdend).append(menuUpCode, castOther.menuUpCode)
				.append(createTime, castOther.createTime).append(updateTime,
						castOther.updateTime).append(sortId, castOther.sortId)
				.isEquals();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(menuCode).append(menuName).append(
				menuDesc).append(menuUrl).append(menuFlag).append(menuIdend)
				.append(menuUpCode).append(createTime).append(updateTime)
				.append(sortId).toHashCode();
	}

	public String toString() {
		return new ToStringBuilder(this).append("menuCode", menuCode).append(
				"menuName", menuName).append("menuDesc", menuDesc).append(
				"menuUrl", menuUrl).append("menuFlag", menuFlag).append(
				"menuIdend", menuIdend).append("menuUpCode", menuUpCode)
				.append("createTime", createTime).append("updateTime",
						updateTime).append("sortId", sortId).toString();
	}

}
